package com.xltt.vehicleControl.bean;

import java.io.Serializable;
import java.util.List;

public class Diagnostic implements Serializable {
    private String ecu;
    private String ecuZh;
    private int diagnosticResult;
    private int exceptionCode;
    private long createTime;
    private List<DtcsEntity> dtcs;
    private static final int RESULT_OK = 0;
    private static final int RESULT_FAULTY = 1;
    private static final int RESULT_UNKNOWN = 2;
    private static final int RESULT_INVALID = 3;
    private static final int RESULT_UNSTART = 4;
    private static final int RESULT_STARTING = 5;

    public Diagnostic() {
    }

    public String getEcu() {
        return this.ecu;
    }

    public void setEcu(String ecu) {
        this.ecu = ecu;
    }

    public String getEcuZh() {
        return ecuZh;
    }

    public void setEcuZh(String ecuZh) {
        this.ecuZh = ecuZh;
    }

    public int getDiagnosticResult() {
        return this.diagnosticResult;
    }

    public void setDiagnosticResult(int diagnosticResult) {
        this.diagnosticResult = diagnosticResult;
    }

    public int getExceptionCode() {
        return this.exceptionCode;
    }

    public void setExceptionCode(int exceptionCode) {
        this.exceptionCode = exceptionCode;
    }

    public long getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public static int getResultOk() {
        return 0;
    }

    public static int getResultUnStart(){
        return RESULT_UNSTART;
    }

    public static int getResultStarting(){
        return RESULT_STARTING;
    }

    public static int getResultFaulty() {
        return 1;
    }

    public static int getResultUnknown() {
        return 2;
    }

    public static int getResultInvalid() {
        return 3;
    }

    public List<DtcsEntity> getDtcs() {
        return this.dtcs;
    }

    public void setDtcs(List<DtcsEntity> dtcs) {
        this.dtcs = dtcs;
    }

    public boolean isResultOK() {
        return this.diagnosticResult == 0;
    }

    public int describeContents() {
        return 0;
    }


    public static class DtcsEntity implements Serializable {
        private String dtcNumber;
        private String dtcNumberHex;
        private String dtcDescription;
        private String dtcDescriptionCN;
        private String repairSuggestion;
        private String repairSuggestionCN;
        private int dtcPriority;

        public String getDtcNumber() {
            return this.dtcNumber;
        }

        public void setDtcNumber(String dtcNumber) {
            this.dtcNumber = dtcNumber;
        }

        public String getDtcNumberHex() {
            return this.dtcNumberHex;
        }

        public void setDtcNumberHex(String dtcNumberHex) {
            this.dtcNumberHex = dtcNumberHex;
        }

        public String getDtcDescription() {
            return this.dtcDescription;
        }

        public void setDtcDescription(String dtcDescription) {
            this.dtcDescription = dtcDescription;
        }

        public String getDtcDescriptionCN() {
            return this.dtcDescriptionCN;
        }

        public void setDtcDescriptionCN(String dtcDescriptionCN) {
            this.dtcDescriptionCN = dtcDescriptionCN;
        }

        public String getRepairSuggestion() {
            return this.repairSuggestion;
        }

        public void setRepairSuggestion(String repairSuggestion) {
            this.repairSuggestion = repairSuggestion;
        }

        public String getRepairSuggestionCN() {
            return this.repairSuggestionCN;
        }

        public void setRepairSuggestionCN(String repairSuggestionCN) {
            this.repairSuggestionCN = repairSuggestionCN;
        }

        public int getDtcPriority() {
            return this.dtcPriority;
        }

        public void setDtcPriority(int dtcPriority) {
            this.dtcPriority = dtcPriority;
        }

        public int describeContents() {
            return 0;
        }



        public DtcsEntity() {
        }


    }
}

